package com.xuelang.pipeline.domain.pipeline.service;

import com.xuelang.pipeline.client.common.result.PageRecord;
import com.xuelang.pipeline.client.pipeline.dto.PipelineTagQuery;
import com.xuelang.pipeline.domain.pipeline.PipelineTag;

import java.util.List;

/**
 * 流水线标签领域服务类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
public interface PipelineTagDomainService {
    /**
     * 获取流水线标签列表，有过滤条件
     *
     * @param currentPage
     * @param pageSize
     * @param pipelineTag
     * @return
     */
    PageRecord<PipelineTag> pageList(long currentPage, long pageSize, PipelineTag pipelineTag);
    /**
     * 获取流水线标签列表，有过滤条件
     *
     * @param pipelineTag
     * @return
     */
    List<PipelineTag> list(PipelineTag pipelineTag);


    /**
     * 新增流水线标签
     *
     * @param pipelineTag
     * @return
     */
    Boolean save(PipelineTag pipelineTag);

    /**
     * 更新流水线标签
     *
     * @param pipelineTag
     * @return
     */
    Boolean update(PipelineTag pipelineTag);
    /**
     * 删除流水线标签
     *
     * @param uuid
     * @return
     */
    Boolean delete(String uuid);

    /**
     * 获取流水线标签
     *
     * @param uuid
     * @return
     */
    PipelineTag query(String uuid);

    /**
     * 根据流水线编码获取流水线x标签关系
     * @param pipelineCode
     * @return
     */
    List<PipelineTag> queryByPipelineCode(String pipelineCode);

    /**
     * 通过流水线编码删除关联流水线标签
     *
     * @param pipelineCode
     * @return
     */
    Boolean deleteByPipelineCode(String pipelineCode);

    /**
     * 流水线标签变更
     * @param query
     * @param creatorId
     * @return
     */
    Boolean modifyPipelineTags(PipelineTagQuery query, String creatorId);
}
